<template>
  <div class="slideshow">
    <mt-swipe :auto="3000">
        <mt-swipe-item v-for="(image, index) in slideShowImage" :key="index">
            <img :src="image.cover" alt="">
        </mt-swipe-item>
    </mt-swipe>
  </div>
</template>
<script>
export default {
  nme: 'SlideShow',
  data(){
      return {
        slideShowImage: []
      }
  },
  created(){
      this.axios.get('/ads',{
          params: {
              type: 'index'
          }
      })
      .then((res) => {
          this.slideShowImage = res.data.data;
      })
      .catch((error) => {
          console.log(error);
      })
  }
}
</script>
<style scoped>
.slideshow{
    width: 100%;
    height: 3.81rem;
    margin-top: .06rem;
}
.slideshow img{
    width: 100%;
    height: auto;
}                      
</style>
<style>
.slideshow .mint-swipe .mint-swipe-indicators .mint-swipe-indicator.is-active{
    background: #009ae8;
} 
</style>
